/**
 * router 存放路由
 */

import VueRouter from 'vue-router';
import Main from '../pages/MainContainer.vue';
import Home from '../pages/Home.vue';
import User from '../pages/User.vue';
import Shop from '../pages/Shop.vue';
import Goods from '../pages/Goods.vue';
import Type from '../pages/Type.vue';
import Admin from '../pages/Admin.vue';
import CountShop from '../pages/CountShop.vue';
import CountGoods from '../pages/CountGoods.vue';
import Activity from '../pages/Activity.vue';
import Login from '../pages/Login.vue';



export default new VueRouter({
    routes: [
        {
            name: 'login',
            path: '/login',
            component: Login
        },
        {
            name: 'main',
            path: '/',
            component: Main,
            children: [
                {
                    name: 'home',
                    path: '/home',
                    component: Home
                },
                {
                    name: 'user',
                    path: '/user',
                    component: User
                },
                {
                    name: 'shop',
                    path: '/shop',
                    component: Shop

                },
                {
                    name: 'goods',
                    path: '/goods',
                    component: Goods
                },
                {
                    name: 'type',
                    path: '/type',
                    component: Type
                },
                {
                    name: 'admin',
                    path: '/admin',
                    component: Admin
                },
                {
                    name: 'countShop',
                    path: '/countShop',
                    component: CountShop
                },
                {
                    name: 'countGoods',
                    path: '/countGoods',
                    component: CountGoods
                },
                {
                    name: 'activity',
                    path: '/activity',
                    component: Activity
                },
            ]
        }
    ]
})